<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title> ng-style动态改变样式 </title>
    <script src="../angular.js"></script>
    <style>

    </style>
</head>
<body>

<div ng-app="gg" ng-controller="ctrl">
    颜色：<input type="color" ng-model="color" ng-value="color"><br />
    大小：<input type="number" ng-model="size" ng-value="size"><br />
    <span ng-style="{color:color, fontSize: size+'px'}">ggggg</span>
</div>

<script>
    var mod = angular.module('gg', []);
    mod.controller('ctrl', ['$scope', function ($scope) {
        $scope.color = 'red';
        $scope.size = 18;
    }])
</script>
</body>
</html>